home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr20
/
tw31.zip
/
TWTUT3.CHP
< prev
next >
Wrap
Text File
|
1993-05-25
|
9KB
|
340 lines
%
#EF
#TGETTING COLORFUL
#C2,R5
There are two ways of adding color to your ~M~Itutorials~N. They can be added by
using the ~HCommands~N which begin with the ~C~I#~N sign, called ~HControl Commands~N or
through ~HInline Commands~N. The ~C~I#~H Control Command~N colors affect whole screens,
while the ~HInline~N colors affect individual letters or words.
~HInline Commands~N begin with ~H~~~N and can be used anywhere in the text.
The ~HQuick Reference~N print-out and the ~c~ZHelp~N system in the ~H~bTutorialWriter~N
~HEditor~N give a full description of the ~HColor Codes~N.
There are ~Height background colors~N available, and ~Hsixteen text colors~N. The
eight background colors are represented by ~Ha lower case letter~N e.g.
~H~~c~N which means '~ccyan background~N'.
Text colors use the ~Hsame eight letters~N, but in ~HUPPER CASE~N, so ~H~~C~N means
'~Ccyan text~N'. A ~Hfurther eight text colors ~Nare available by adding ~H~~I~N
which means '~Hintense~N'. ~H~~C~~I~N means '~C~ILightCyan text~N'.
#W
%
#EF
#T15,1
#C2,R5
The ~HCommands~N can be combined, of course, so ~H~~b~~C~~I~N means ~b~C~ILightCyan
on a Blue background~N.
And text colors can be made to blink or flash by adding ~H~~F~N. ~H~~b~~C~~I~~F~N
means ~b~C~I~Fblinking LightCyan on a Blue background~N.
~HOnce a color has been set, it will continue until it is changed by another
Command~N. To make things easier, two ~HCommands~N can be predefined as default
colors, using the ~C~IConfigure Tutorial~N option. ~H~~N~N is the 'normal text color' and
~H~~H~N is the ~HHighlight color~N.
#WP
%
#EF
#T15,1
#C2,R6
This text is in default normal color.
~~HThis text is in default hilite~~N ~HThis text is in default hilite~N
(~C~IThe ~~N at the end switches it back to default normal color.~N)
#D10
~~GThis text is green~~N ~GThis text is green~N
~~G~~IThis text is lightgreen~~N ~G~IThis text is lightgreen~N
~~G~~FThis is green blinking~~N ~G~FThis is green blinking~N
~~G~~I~~FThis is lightgreen blinking~~N ~G~I~FThis is lightgreen blinking~N
#D10
~~c~~ZBlack text on a cyan background~~N ~c~ZBlack text on a cyan background~N
~~c~~Z~~F Now it is blinking ~~N. ~c~Z~F Now it is blinking ~N
#WP
%
#EF
#T15,1
#C2,R5
And there are two non-color ~HInline Commands~N.
~H~~K~N writes to the screen with a click (~H~~k~N resets it ) and
~H~~S~N writes to the screen slowly (~H~~s~N stops it).
~~K~~HThis will write in default hilite with a clicking sound.~~N~~k
#D30
~K~HThis will write in default hilite with a clicking sound.~N~k
~~S~~M~~IThis will write slowly but silently in lightmagenta~~N~~s.
#D30
~S~M~IThis will write slowly but silently in lightmagenta~N~s.
#WP
%
#EF
#T15,1
#C2,R5
When you are creating a ~HCHAPTER~N, I recommend that you type out what you
want to say and get it positioned on the screen the way you want it, before
you insert the ~HInline Command Codes~N. When you do insert the ~HCodes~N, some of
the words may be pushed off the edge of the screen. When ~G~ITWTEACH~N reads the
file, the ~H~~ Code~N and the letter following it are not printed, so your text
will be positioned on the screen as it was before the ~HCodes~N were inserted.
But if you put the ~HCodes~N in as you write the text, it can be difficult to
visualize how it will appear on the final screen.
By the way, this is the reason the ~H~bTutorialWriter~C~I~z Editor~N doesn't word-wrap!
#WP
%
#EF
#T15,1
#C2,R5
In the last Chapter we covered the ~C~I#Cx~N and ~C~I#Ry~H Commands~N which position the
Cursor. Here's a bit more detail about them, and things they let you do.
The ~HCommand~C~I #Cx1~N sets the cursor to ~HColumn x1 of the current row~N. The screen
has 80 columns, numbered 1 thru 80, starting from the left. When the Column
has been set, ~Hit remains at that setting until it is reset~N. For example,
let's change the Column setting to 40, then print three lines to the screen:
~H#C40
First row
next row
next row~N
#W
#EL,25
#C40,R14
~HFirst row
next row
next row~N
#C2,R20
#D2
The ~HCommand ~C~I#Ry1~N sets the cursor at ~HRow y1 at the current cursor position~N.
The screen has 25 Rows, numbered 1 thru 25, starting from the top. ~HThe Row
is automatically increased at the end of each line~N.
#WP
%
#EF
#T15,1
#C2,R5
These two ~HCommands~N can be joined by replacing the ~C~I#~N in front of ~C~I#Ry1~N with a
comma. ~C~I#Cx1,Ry1~N means ~Hset the cursor at Column x1, Row y1~N. This joined
~HCommand~N gives complete control over the cursor, and allows you to highlight
items on the screen with ~HInline Commands~N. For example, let's change part of
Row 5 :
~H#C28,R5
~~H~~Fjoined by replacing~~N
~H#D5
~H#C28,R5
~~H~~rjoined by replacing~~N
~H#D5
~H#C28,R5
~~Hjoined by replacing~~N
#D20
#C28,R5
~H~Fjoined by replacing
#D5
#C28,R5
~H~rjoined by replacing
#D5
#C28,R5
~Hjoined by replacing
#WP
%
#EF
#T15,1
#C2,R6
Another ~HCommand~N that you may have noticed on the previous screen is the
~C~I#Dn~H Command~N. It is used in almost all these examples and is a very useful
~HCommand~N.
It delays printing to the screen for ~C~In~H seconds, or until a key or the
MOUSE Button is pressed~N.
So if nothing seems to be happening in this ~G~ITutorial~N and you are ready to
move on, press a key or the MOUSE button.
#WP
%
#EF
#T
#C2,R5
Now we'll look at adding color through two of the ~HControl Commands~N you met in
the last Chapter :-
~H #T[Fore,Back][,titlename]
#EF[Fore,Back]~N
The colors for ~C~I#~H Commands~N are represented by numbers and you can refer to
them on your ~HQuick Reference~N printout as we go along. And with all these
~HCommands~N, carefully study the use of ~C~ICommas as separators~N. If the ~HCommas~N are
not properly placed, the ~HCommand~N will not behave as expected.
#WP
%
#EF
#T15,1
#C2,R5
The ~HCommand~N to put a title on the screen is ~C~I#T~N. The first time it is used in
a ~G~ITutorial~N it is necessary to state the titlename, since there is no default.
~H#TMy Chosen Title~N
#D20
#TMy Chosen Title
#C2,R11
When the title has been defined, ~C~I#T~N will put it on the screen in the default
colors of white on red. To keep the same title, but change its colors, the
command is ~C~I#TFore,Back~N. Let's try blue on gray.
~H#T1,7~N
#D20
#T1,7
#C2,R18
To change both the colors and the title use the ~HCommand~C~I #TFore,Back,newtitle~N.
This time we'll choose black on cyan.
~H#T0,3,New Title~N
#D20
#T0,3,New Title
#WP
%
#EF
#TGETTING COLORFUL
#C2,R5
~C~I#EF[Fore,Back]~N clears the screen, removing the title. Used as ~C~I#EF~N it
clears it to the default colors you define using the ~M~IConfigure Tutorial~N menu
option. To change the text and background colors, put in values for ~C~IFore~N and
~C~IBack~N. The following Command will change the screen colors to black on white.
~H#EF,0,7~N
#D20
#EF,0,7
#C2,R8
The screen colors are now black on white, but the title has gone. The cursor
is positioned, by default, at column 1 on row 1 and you must reposition it.
When you use the ~B#EF Command~Z~w, you will also need to use the ~B#T Command~Z~w.
Then the cursor will be positioned, by default, at column1 on row 4 and you
reposition it with the ~B~w#Cx,Ry Command~Z~w. For example, this will change
the title color to Intense White on Blue and start writing at Col2, Row22
~B~w#T15,1~Z~w
~B~w#C2,R22~Z~w
#D20
#T15,1
#C2,R22
~Z~wNow change the Title color back to its Default colors.
~B#T~N
#D10
#T
#EL,25,14,0
#WP
%
#EF
#T
#C2,R5
There are two other erase ~HCommands~N. ~C~I#EL,y1~N erases the line at ~HRow ~C~Iy1~N.
The other, ~C~I#ES,x1,y1,x2,y2[,Fore,Back]~N erases a section of the screen from
~HColumn ~C~Ix1~N, ~HRow ~C~Iy1~N to ~HColumn ~C~Ix2~N, ~HRow ~C~Iy2~N. The color of the erased section
can be changed by inserting values for ~C~IFore~N and ~C~IBack~N. ~HBear in mind that
these colors will remain in effect until you change them!~N When the section
is erased, the cursor is placed in the top left hand corner of that section.
Here's an example. Note that when the line at Row 5 is erased, the color is
still red. The ~H~~N~N changes it back to normal default, and the line is cleared
again, this time in black.
~H#ES,20,6,40,11,15,4
~HYou are here
~H#EL,5
~H~~N
~H#EL,5
#WN
#EL,25
#ES,20,6,40,11,15,4
You are here
#D5
#EL,5
~N
#D3
#EL,5
#WP
%
#EF
#TGETTING COLORFUL
#C2,R7
That's the end of this Chapter on c~G~Io~B~Il~Ho~R~Ir~C~Is~N.
With these ~HCommands~N and the ones you learned in ~HChapter 2~N, you can create
some pretty nice ~M~Itutorials~N.
But the next Chapter will show you how to get your message across using some
~Hattention-getting screens~N.
#WP
#X